package com.bJian.bJIanOJ.judge.codeSandbox;

import com.bJian.bJIanOJ.judge.codeSandbox.model.ExecuteCodeRequest;
import com.bJian.bJIanOJ.judge.codeSandbox.model.ExecuteCodeResponse;
import com.bJian.bJIanOJ.model.dto.question_submit.JudgeInfo;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class codeSandboxProxy implements CodeSandbox {

    private final CodeSandbox codeSandbox;

    public codeSandboxProxy (CodeSandbox codeSandbox){
        this.codeSandbox = codeSandbox;
    }

    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest executeCodeRequest) {
        log.info("代码沙箱请求前信息："+executeCodeRequest);
        ExecuteCodeResponse executeCodeResponse = codeSandbox.executeCode(executeCodeRequest);
        log.info("代码沙箱请求后返回信息："+executeCodeResponse);
        return executeCodeResponse;
    }
}
